namespace MsForgeReboot.Services.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class FixRequiredNonEmptyStringUrlTitle : DbMigration
    {
        public override void Up()
        {
            DropIndex("dbo.BlogPosts", "IX_UrlTitle");
            DropIndex("dbo.Pages", "IX_UrlTitle");
            AlterColumn("dbo.BlogPosts", "UrlTitle", c => c.String(nullable: false, maxLength: 200));
            AlterColumn("dbo.Pages", "UrlTitle", c => c.String(nullable: false, maxLength: 200));
            CreateIndex("dbo.BlogPosts", "UrlTitle", true);
            CreateIndex("dbo.Pages", "UrlTitle", true);
        }
        
        public override void Down()
        {
            DropIndex("dbo.BlogPosts", "IX_UrlTitle");
            DropIndex("dbo.Pages", "IX_UrlTitle");
            AlterColumn("dbo.Pages", "UrlTitle", c => c.String(maxLength: 200));
            AlterColumn("dbo.BlogPosts", "UrlTitle", c => c.String(maxLength: 200));
            CreateIndex("dbo.BlogPosts", "UrlTitle", true);
            CreateIndex("dbo.Pages", "UrlTitle", true);
        }
    }
}
